[PATCH] setopt: clear proxy auth properties when switching
Verify with test 1588
Closes #21453
Backported-by: Samuel Henrique <samueloph@debian.org>
* lib/setopt.c: upstream's CURLOPT_PROXY case lives in a dedicated
setopt_cptr_proxy() function; in 8.14.1 it is still inline in the
setopt_cptr() switch. The setproxy() helper is added directly
above setopt_cptr() and the inline Curl_setstropt() call is
swapped for setproxy().
* lib/vauth/vauth.h: upstream's hunk also adds a no-op
Curl_auth_is_digest_supported() macro to the CURL_DISABLE_DIGEST_AUTH
branch, but our 8.14.1 vauth.h has no such #else branch (the file
ends the digest block with a bare #endif). Add only the
Curl_auth_digest_cleanup(x) no-op macro inside a new #else, which
is the part actually needed by setproxy() in disable-digest builds.
* tests/data/test1588: regression test from upstream with two changes:
crlf="headers" -> crlf="yes" so the 8.14.1 test runner correctly
applies CRLF to header lines on both the server-side data and the
expected protocol block; and the "digest" entry in <features> is
dropped because the 8.14.1 curlinfo emits the feature toggle as
"digest-auth" rather than "digest", so the unmodified feature gate
would always SKIP the test on this branch. Other digest-auth tests
(e.g. test1061) similarly do not list "digest" as a required
feature.
* tests/libtest/lib1588.c: rewritten to use the 8.14.1 libtest
harness (test.h / CURLcode test(char *URL) / easy_init / easy_setopt
with goto test_cleanup) instead of upstream's newer first.h-based
one. The init1588() helper also reuses the parent's test_cleanup
label rather than upstream's separate init_failed label, since
8.14.1's easy_setopt jumps directly to test_cleanup.
Backported by: Samuel Henrique <samueloph@debian.org>
* Bookworm 7.88.1: lib/setopt.c is a single Curl_vsetopt() function
with one big switch (no setopt_cptr() sub-switch like trixie).
Add the setproxy() helper just above Curl_vsetopt() instead, and
replace the inline Curl_setstropt() in the CURLOPT_PROXY case
with `result = setproxy(data, va_arg(param, char *));`.
* lib/vauth/vauth.h: bookworm uses CURL_DISABLE_CRYPTO_AUTH (the
pre-split spelling) instead of CURL_DISABLE_DIGEST_AUTH. Add the
no-op Curl_auth_digest_cleanup(x) macro under the matching
#else branch.
* Drop the test additions: bookworm has neither the test1588
xml-test infrastructure for CONNECT-based digest replay nor the
modern libtest harness (test.h / CURLcode test(char *URL)) the
trixie adaptation rewrote against -- backporting the test would
require touching the test runner setup more aggressively than is
appropriate for a stable update. The security property (proxy
auth state cleared on CURLOPT_PROXY change) is the setproxy()
helper itself.
Gbp-Pq: Name CVE-2026-7168.patch